package com.squirrel.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * Channel 频道实体类
 * </p>
 *
 * @author 关远键
 * @since 2021/11/11 16:06
 */
@Data
@TableName("channel")
@ApiModel(value = "频道", description = "")
public class Channel extends Model<Channel> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("频道id")
    @TableId(value = "channel_id", type = IdType.AUTO)
    private Integer channelId;

    @ApiModelProperty("频道名称")
    @TableField("channel_title")
    private String channelTitle;

    @ApiModelProperty("上一级频道id（为0则为最上层频道）")
    @TableField("channel_parent")
    private Integer channelParent;


    @Override
    public Serializable pkVal() {
        return this.channelId;
    }

}
